package club.justwill.single.model;


/**
 * Created by xiangnan on 15-12-23.
 */
public class ServiceChannel {
    public static int UNKNOWN = 0;
    public static int PC = 10;
    public static int ANDROID = 20;
    public static int IOS = 30;

    public static String getChannelType(int type) {
        switch(type) {
            case 0 : return "UNKNOWN";
            case 10 : return "PC";
            case 20 : return "ANDROID";
            case 30 : return "IOS";
            default: return null;
        }
    }

    public static int getUserTypeCode(String type) {
        if(type.equals("UNKNOWN")) { return 0;}
        if(type.equals("PC")) { return 10;}
        if(type.equals("ANDROID")) { return 20;}
        if(type.equals("IOS")) { return 30;}
        return 0;
    }


}
